package com.test.reactor_test;

import org.reactivestreams.Subscriber;

/**
 * @author zxs
 * @version 1.0
 * @date 2019-03-18
 */
public class FluxArray<T> extends Flux<T> {

    private T[] array;

    public FluxArray(T[] array){
        this.array = array;
    }

    @Override
    public void subscribe(Subscriber<? super T> subscriber) {
        subscriber.onSubscribe(new ArraySubscriber<>(subscriber,array));
    }
}
